﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.GateUI {
    import flash.events.*;
    import Engine.Managers.*;
    import flash.display.*;
    import Events.*;
    import flash.utils.*;
    import Display.DialogUI.*;
    import org.aswing.*;
    import Classes.*;
    import Display.*;
    import flash.text.*;
    import Display.aswingui.*;

    public class AskFriendsDialogView extends GenericDialogView {

        protected var m_iconPane:AssetPane;

        public function AskFriendsDialogView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:int=0, _arg5:Function=null, _arg6:String="", _arg7:int=0, _arg8:Function=null){
            super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, "", _arg8);
        }
        override protected function createTitlePanel():JPanel{
            var _local1:JPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
            var _local2:String = m_titleString;
            title = ASwingHelper.makeTextField(_local2, EmbeddedArt.TITLE_FONT, m_titleFontSize, EmbeddedArt.titleColor);
            title.filters = EmbeddedArt.titleFilters;
            var _local3:TextFormat = new TextFormat();
            _local3.size = m_titleSmallCapsFontSize;
            TextFieldUtil.formatSmallCaps(title.getTextField(), _local3);
            _local1.append(title);
            title.getTextField().height = (m_titleFontSize * 1.5);
            ASwingHelper.setEasyBorder(_local1, 4);
            return (_local1);
        }
        override protected function createIconPane():JPanel{
            this.m_iconPane = new AssetPane();
            var _local1:String = m_icon;
            var _local2:Loader = LoadingManager.load(_local1, this.loadIcon);
            var _local3:JPanel = ASwingHelper.makeSoftBoxJPanelVertical(SoftBoxLayout.CENTER);
            _local3.append(this.m_iconPane);
            return (_local3);
        }
        private function loadIcon(_arg1:Event):void{
            this.m_iconPane.setAsset((_arg1.target as LoaderInfo).content);
            ASwingHelper.prepare(this.parent);
            dispatchEvent(new UIEvent(UIEvent.REFRESH_DIALOG, "iconLoaded", true));
        }

    }
}//package Display.GateUI 
